home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / povray / scenes / level2 / polywood.pov < prev    next >
Text File  |  1994-03-08  |  3KB  |  108 lines

  1. // Persistence Of Vision Raytracer
  2. // version 2.0 sample file.
  3. //
  4. // PolyWood.pov - Wooden polyhedron hollowed by a sphere
  5. // on a grassy hilly lawn.  Shows how easy it is to
  6. // create interesting shapes with CSG operations
  7. // and simple primitive shapes.
  8. //
  9. // By Eduard [esp] Schwan -- 71513,2161
  10. // Last modified: 5/22/93
  11.  
  12. include "shapes.inc"
  13. include "colors.inc"
  14. include "textures.inc"
  15.  
  16. // Moi
  17. camera {
  18.    location   <-3.3,  0.8, -11.0>
  19.    direction  <0.0,   0.0,   1.0>
  20.    up         <0.0,   1.0,   0.0>
  21.    right      <4/3,   0.0,   0.0>
  22.    look_at    <0,     0,     0>
  23. }
  24.  
  25. // Some Light just above the horizon for a long shadow
  26. light_source
  27. {
  28.   <30, 6, -40>
  29.   color White
  30. }
  31.  
  32.  
  33. // The Cloudy Blue Sky
  34. sphere
  35. {
  36.   <0, 0, 0>, 10000
  37.   pigment
  38.   {
  39.      Bright_Blue_Sky
  40.      scale <4000, 600, 1000>
  41.   }
  42. }
  43.  
  44.  
  45. // The Hilly Grassy Land
  46. plane
  47. {
  48.   y, -4.1
  49.   pigment { color red 0.2 green 1.0 blue 0.4 }
  50.   finish
  51.   {
  52.       crand 0.025 // a little randomness to hide the rather severe color banding
  53.       ambient 0.1
  54.       diffuse 0.7
  55.       roughness 1
  56.    }
  57.    normal { bumps 0.5  scale 10 }
  58. }
  59.  
  60.  
  61. // The Wooden Polyhedron
  62. // The idea here is to take a few cubes rotated at 45 degrees
  63. // along different axes from each other and intersect them,
  64. // thus cutting some corners.  Then we carve out the center
  65. // with a slightly oversized sphere, which protrudes slightly
  66. // through the sides of the cubes, cutting portholes in the
  67. // facets of the polyhedron.  Then we get out the wooden paint..
  68. intersection {
  69.    // polyhedron
  70.    // Add small amount to each box to account for normal numerical inacurracies.
  71.    // This fixes surface acne on coplanar surfaces.
  72.    box { <-4.000, -4.000, -4.000>, <4.000, 4.000, 4.000> }
  73.    box { <-4.001, -4.001, -4.001>, <4.001, 4.001, 4.001>   rotate 45*x }
  74.    box { <-4.002, -4.002, -4.002>, <4.002, 4.002, 4.002>   rotate 45*y }
  75.    box { <-4.003, -4.003, -4.003>, <4.003, 4.003, 4.003>   rotate 45*z }
  76.    // hollow it out
  77.    sphere { <0, 0, 0>, 4.25 inverse }
  78.  
  79.    // semi-dark wood with dark greenish rings
  80.    pigment {
  81.       wood
  82.       turbulence 0.04
  83.       colour_map {
  84.         [0.0 0.4  color red 0.8 green 0.4 blue 0.2
  85.                   color red 0.8 green 0.4 blue 0.1]
  86.         [0.4 0.5  color red 0.1 green 0.3 blue 0.1
  87.                   color red 0.1 green 0.3 blue 0.2]
  88.         [0.5 0.8  color red 0.1 green 0.3 blue 0.2
  89.                   color red 0.8 green 0.4 blue 0.1]
  90.         [0.8 1.0  color red 0.8 green 0.4 blue 0.1
  91.                   color red 0.8 green 0.4 blue 0.2]
  92.       }
  93.       scale <0.2, 0.2, 1>
  94.       rotate <45, 0, 5>
  95.       translate <2, 2, -4>
  96.    }
  97.    finish {
  98.       // make it look wood-like
  99.       ambient 0.15
  100.       diffuse 0.6
  101.       // make it a little bit shiny
  102.       specular 0.3 roughness 0.01
  103.       phong 0.3 phong_size 60
  104.    }
  105. }
  106.  
  107. // ttfn!
  108.